import java.util.*;

class Main {

	static int getRandom(int min, int max) {
		// [min, max)内的随机数：min + (Math.random() * (max - min))
		// [min, max]内的随机整数：min + (int)(Math.random() * ((max - min) + 1))
		return min + (int)(Math.random() * ((max - min) + 1));
	}
	public static void main(String[] args) {
		String str = "";
		int total = 0;
		while (total < 20) {
			int r = getRandom(10, 90);

			if (str.indexOf("" + r) == -1) {
				str += r;
				total++;
				if (total < 20)
					str += ",";
			}
		}
		System.out.println(str);

		String numberStrs[] = str.split(",");
		int numbers[] = new int[numberStrs.length];
		for (int i = 0; i < numberStrs.length; i++) {
			numbers[i] = Integer.parseInt(numberStrs[i]);
		}

		Arrays.sort(numbers);
		for (int x : numbers) {
			System.out.print(x + " ");
		}
		
	}
}
